package com.wang.cloud.manage.domain.co;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;


/**
 * <p>
 * 系统-菜单权限表
 * </p>
 *
 * @author wy
 * @since 2024-07-15
 */
@Getter
@Setter
@Schema(description = "系统-菜单权限表新增参数")
public class MenuCo {

    @NotBlank(message = "请输入路由名称")
    @Size(max = 30, message = "路由名称不能超过30字符")
    @Schema(description = "菜单(路由)名称")
    private String menuName;

    @Size(max = 200, message = "路由地址不能超过200字符")
    @Schema(description = "路由地址")
    private String path;

    @Size(max = 100, message = "icon不能超过100字符")
    @Schema(description = "菜单图标")
    private String icon;

    @NotBlank(message = "菜单类型不能未空")
    @Pattern(regexp = "^[MCF]$", message = "菜单类型错误")
    @Schema(description = "菜单类型（M目录 C菜单 F按钮）")
    private String menuType;

    @NotBlank(message = "状态不能为空")
    @Pattern(regexp = "^[01]$", message = "状态错误")
    @Schema(description = "菜单状态（0正常 1停用）")
    private String status;

    @Range(min = 0, max = 999999999, message = "显示顺序仅支持0-999999999")
    @Schema(description = "显示顺序")
    private Integer orderNum;

    @Size(max = 100, message = "权限标识不能超过100字符")
    @Schema(description = "权限标识")
    private String perms;

    @Size(max = 255, message = "组件路径长度不能超过255字符")
    @Schema(description = "组件路径")
    private String component;

    @Range(min = 0, max = 1, message = "是否为外链错误")
    @Schema(description = "是否为外链（0是 1否）")
    private Integer isFrame;

    @Range(min = 0, max = 1, message = "是否缓存错误")
    @Schema(description = "是否缓存（0缓存 1不缓存）")
    private Integer isCache;

    @Range(min = 0, max = 1, message = "菜单显示状态错误")
    @Schema(description = "菜单状态（0显示 1隐藏）")
    private String visible;

}
